<template>
  <div class="app-container">
    <div id="content" class="box-card">
      <h3 class="ordertitle el-icon-document">订单详情<span onclick="javascript:window.history.back(-1);" class="orderback" title="返回"><i class="el-icon-back"></i></span></h3>
      <el-row :gutter="20" v-loading="isLoading">
        <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">订单编号</span><span class="col-value">{{ resdata.orderNo}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">订单金额(元)</span><span class="col-value">{{ resdata.amount}}</span></div></el-col>
        <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">订单状态</span><span class="col-value">{{ resdata.status}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">实收手续费</span><span class="col-value">{{ resdata.actualFee}}</span></div></el-col>
        <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">产品编号</span><span class="col-value">{{ resdata.productCode}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">预收手续费</span><span class="col-value">{{ resdata.advanceFee}}</span></div></el-col>
        <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">项目名称</span><span class="col-value">{{ resdata.projectName}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">交易天数</span><span class="col-value">{{ resdata.transferDay}}</span></div></el-col>
        <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">项目编号</span><span class="col-value">{{ resdata.projectNo}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">起息日期</span><span class="col-value"></span>{{ resdata.interestDate}}</div></el-col>
        <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">平台机构号</span><span class="col-value">{{ resdata.org}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">预审文件URL</span><span class="col-value">{{ resdata.preDocuUrl}}</span></div></el-col>
       <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">平台商户编号</span><span class="col-value">{{ resdata.bizUserId}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">退款日期</span><span class="col-value">{{ resdata.refundDate}}</span></div></el-col>
       <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">投标人机构号</span><span class="col-value">{{ resdata.bidorderId}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">退还手续费</span><span class="col-value">{{ resdata.returnFee}}</span></div></el-col>
       <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title">招标商名称</span><span class="col-value">{{ resdata.tenderName}}</span> </div></el-col> <el-col :span="12"><div class="grid-content bg-purple"><span class="col-title"></span><span class="col-value"></span></div></el-col>
      </el-row>
      </div>
  </div>
</template>


<script>
import { queryOrderdetails } from '@/api/order'
export default {
  data(){
    return {
        resdata:{
        orderNo:'',
        status:'',
        productCode:'',
        projectName:'',
        projectNo:'',
        actualFee:'',
        advanceFee:'',
        refundDate:'',
        returnFee:'',
        org:'',
        transferDay:'',
        amount:'',
        interestDate:'',
        preDocuUrl:'',
        bizUserId:'',
        tenderName:'',
        bidorderId:'',
        },
        isLoading:''
    }
  },
  created() {
    this.fetchdata()
  },
  methods: {
      fetchdata() {
        this.isLoading =true
      queryOrderdetails(this.filtersForm,{bidorderId:this.$route.params.orderId}).then(res => {
          // this.tableData2 = []
          this.isLoading = false
        if (res.data && res.code === '000000') {
          this.resdata = res.data
          for(let item in this.resdata){
              this.resdata[item].tit=item
              this.resdata[item].title='子订单编号：'+this.resdata[item].subOrderId
          }
          this.activeNames=this.resdata[0].tit
          this.loading=false
        }
      }).catch(error => {
        console.log('errors' + error)
      })
    }
  }

}

</script>
<style lang="scss" scoped>
  .el-row{
     padding:10px;
     line-height: 30px;
     .col-title{
       width: 120px;
       display: inline-block;
     }
  }
</style>
<style>
 #content{
   margin-top:0;
   width:100%;
   min-width:1000px;
   border-radius: 5px;
   border:1px solid #E4E7ED;
   overflow: hidden;
 }
 .ordertitle{
   line-height:40px;
   padding-left:10px;
   border-bottom:1px solid #E4E7ED;
   height:40px;
   display:block;
 }
 .orderlist{
   width:50%;
   float:left;
   margin-bottom:0px;
 }
 .orderback{
   float:right;
   height:40px;
   width:40px;
 }
</style>
